# long 爬虫
# {2021/9/7}
# 本章目的：

from urllib.request import urlopen

url = "http://www.baidu.com"
resp = urlopen(url)
data = resp.read().decode("utf-8")
print()
with open("mybaidu.html",'w',encoding='utf-8') as f:
    f.write(data)
    f.close()